
#ifndef __MOVIE_GLOBALS_H__

#define __MOVIE_GLOBALS_H__

//#define VPU_CLOCK_CONTROL

#define  __EDIT_CHROMAKEY_VALUE__

//#define TCCSPDIF_INTERFACE

//#define __TCC_AUDIO_OUTPUT_CONTROL_FILTER__

#define __EC_COMPLETE_INCLUDE__
//#define __VIDEO_AGING_TEST_INCLUDE__

#define VOLUME_MUTE_INCLUDE

// '__3D_DISPLAY_INCLUDE__' is defined at "Common/virtual.h"

//#define __VIDEO_RENDER_SWITCH__

#define TCCAUDIO_SELECT

#define VOLUME_MAX 15
#define VOLUME_MIN 0
#define VOLUME_STEP 1

#define TMR_PROGRESS 1001
#define TMR_BUTTON	 1002

#ifdef VOLUME_MUTE_INCLUDE
#define TMR_VOLUME_ON 1003
#define TMR_VOLUME_ON_TIME 200 //msec
#endif

#define BUTTON_SHOW_TIME_OUT	 50

enum{
	PLAY_STATUS_STOP,
	PLAY_STATUS_PLAY,
	PLAY_STATUS_PAUSE,
	PLAY_STATUS_MAX,
};

enum{
	REPEAT_MODE_ALL,
	REPEAT_MODE_ONE,
	REPEAT_MODE_MAX,
};

enum{
	AUTO_START_OFF,
	AUTO_START_ON
};

enum{
	UI_LCD,
	UI_TVP5150_NTSC,
	UI_TVP5150_PAL,
	UI_LIST_TOTAL,
};

#ifdef __TCC89XX_WINCE__
#define __VIQE__
#define __RESIZE__
#define __CAPTURE_BY_SCALER__
#endif



#define WQVGA_WINDOW_WIDTH  288
#define WQVGA_WINDOW_HEIGHT 168-16

#define WVGA_WINDOW_WIDTH   560
#define WVGA_WINDOW_HEIGHT  336+16

#define OUTPUT_LEFT_INIT	8
#define OUTPUT_TOP_INIT		16

#define BUTTON_GAP	  5

#define VOLUME_CTRL_WIDTH 150
#define VOLUME_CTRL_HEIGHT 20
#define VOLUME_CTRL_GAP    10

#define FILE_NAME_DISPLAY_HEIGHT 20
#define FILE_LIST_DISPLAY_HEIGHT 20
#define PLAY_PROG_DISPLAY_HEIGHT 20
#define PLAY_TIME_DISPLAY_WIDTH  120
#define PLAY_PROG_DISPLAY_GAP	 2
#define PLAY_STATUS_DISPLAY_WIDTH 50

enum{
	DISPLAY_NORMAL,
	DISPLAY_MAXSIZE,
	DISPLAY_MAXSIZE_BUTTON,
	DISPLAY_MAXMODE,
};

enum{
	STORAGE_INT,
	STORAGE_SDMMC,
	STORAGE_SATA,
	STORAGE_OTG,
	STORAGE_OTG2,
	STORATE_MAX
};

enum{
	NO_TV_OUT_MODE,
	TV_OUT_MODE
};

#define STD_AVC		0 //!< DEC / ENC
#define STD_VC1		1 //!< DEC
#define STD_MPEG2	2 //!< DEC
#define STD_MPEG4	3 //!< DEC / ENC
#define STD_H263	4 //!< DEC / ENC
#define STD_DIV3	5 //!< DEC
#define STD_RV		6 //!< DEC

typedef enum 
{
	CDK_DEMUX_TYPE_NULL, 	// 0
	CDK_DEMUX_TYPE_MKV, 	// 1
	CDK_DEMUX_TYPE_MP4, 	// 2
	CDK_DEMUX_TYPE_AVI, 	// 3
	CDK_DEMUX_TYPE_MPG, 	// 4
	CDK_DEMUX_TYPE_TS, 		// 5
	CDK_DEMUX_TYPE_ASF, 	// 6
	CDK_DEMUX_TYPE_RMFF, 	// 7
	CDK_DEMUX_TYPE_AUDIO,	// 8
	CDK_DEMUX_TYPE_OGG, 	// 9
	CDK_DEMUX_TYPE_FLV		// 10

} CDK_DEMUX_TYPE;

typedef struct _tVRender{
	unsigned int nYAddress;
	unsigned int nUAddress;
	unsigned int nVAddress;
	unsigned int nWidth;
	unsigned int nHeight;
	unsigned int nType; // 1=Progressive, 2=Interlaced Even First, 3 =Interlaced Odd First
	unsigned int nCropLeft;
	unsigned int nCropRight;
	unsigned int nCropTop;
	unsigned int nCropBottom;
}tVRender;

typedef struct
{
	unsigned int left;
	unsigned int top;
	unsigned int right;
	unsigned int bottom;
	unsigned int LCDC;
	unsigned int Image;
	unsigned int Use;
}stVRM;

#ifdef __EC_COMPLETE_INCLUDE__
#define	WM_GRAPH_NOTIFY		(WM_APP + 1)
#endif

extern void JpegEncoder(BYTE *rgb_buf, TCHAR *path, int width, int height);
#endif
